/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package scrabble;

import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
import javax.swing.Icon;

/**
 *
 * @author KhoufiAsma
 */
public class CaseVide extends Case {
    private int valLettre;
   private int valMot;
    private boolean etat;
   private  Lettre let;
   private int posLigne;
   private int posColonne;
   private char lettre;
   private Icon imageicone;
   private  Fenetre.MyDropTargetListener myDropTargetListener;
private DropTarget  dropTarget;
 public  CaseVide(Icon imageicon,int valLettre,int valMot,int i,int j,Fenetre.MyDropTargetListener myDropTargetListener) {
        super(imageicon);
        this.valLettre=valLettre;
        this.valMot=valMot;
        this.etat=false;
        posLigne=i;
        posColonne=j;
        this.imageicone=imageicon;
        this.myDropTargetListener=myDropTargetListener;
     dropTarget = new DropTarget(this, DnDConstants.ACTION_MOVE, myDropTargetListener , true, null);
       
    }
   
   
   public int getValLettre()
   {
   return valLettre; 
   }
    public int getValMot()
   {
   return valMot; 
   }
   public boolean getEtat()
   {
       return etat;
   }
   public Lettre getLettre()
   {
       return let; 
   }
   public char getLetNom()
   {
      return let.getNom(); 
   }
      public char getLet()
   {
       return lettre; 
   }
      
   public void setValLettre(int val)
   {this.valLettre=val; 
   }
    public void setLet(char lettre)
   {this.lettre=lettre; 
   }
   public void setEtat(boolean etat)
   {
       this.etat=etat;
   }
   public void setLettre(Lettre let)
   {
       this.let=let;
   }
    public void setValMot(int val)
   {this.valMot=val; 
   }
    public int getPosLigne()
    {
        return posLigne;
    }
    public int getPosColonne()
    {
        return posColonne;
    }
    public void setDropTarget(boolean b)
    {
        dropTarget.setActive(b);
    }
    public void setImagecon()
    {
        setIcon(imageicone);
    }
}
